#!/usr/bin/env python
# -*-coding:UTF-8-*
################################################################################

import MySQLdb

from MySQLdb import *

class MySQLCon:
	def connect(self, host, user, passwd, db):
		self.conn = MySWLdb.connect(host, user, passwd, db)
		self.cursor = conn.cursor()
		
	def get_databases(self):
		stmt = "show databases"
		self.cursor.execute(stmt)
		
		return cursor.fetchall()
	
	def get_tables(self):
		stmt = "show tables"
		
		self.cursor.execute(stmt)
		
		return cursor.fetchall()
	
	def get_table_info(self, table):
		stmt = "desc "
		stmt += table
		
		self.execute(stmt)
		
		return cursor.fetchall()
		
	def close(self):
		self.sursor.close()
		self.conn.close()
		
	def init_table(self, table):
		pass
	
	def __make_param(types):
		pass
	
	
	
	
	

